﻿@model HXDNB.DAL.BuyParentOrder
<div class="widget-content">
    <div class="widget-box">
        <div class="widget-title">
            <span class="icon"><i class="icon-align-justify"></i></span>
            <h5>
                填写产品信息</h5>
        </div>
        <div class="widget-content nopadding">
            @if (IsPost == false && Request["result"] != null)
            {
                if (Request["result"] == "Y")
                {
                <div class="alert alert-success" style="margin-bottom: 0px;">
                    <a class="close" data-dismiss="alert" href="#">×</a>
                    <h4 class="alert-heading">
                        保存成功!</h4>
                    您填写的数据已经成功录入,你可以继续添加或者返回列表查看.
                </div>
                }
                else
                {
                <div class="alert alert-error" style="margin-bottom: 0px;">
                    <a class="close" data-dismiss="alert" href="#">×</a>
                    <h4 class="alert-heading">
                        保存失败!</h4>
                    如确认您的数据填写无误,请联系管理员或查看错误日志.
                </div>
                }
            }
            <form action="@Url.Action("ParentInfo", "BuyOrder", new { id = Request.QueryString["id"] })" method="post" class="form-horizontal" enctype="multipart/form-data" >
            <div class="widget-content tab-content">
                <div id="tab1" class="tab-pane active">
                    <div class="control-group">
                        <label class="control-label">
                            供货商:</label>
                        <div class="controls">
                            <div class="span6">
                                @Html.DropDownListFor(i => i.CustomerID, new CustomerBLL().GetForSelect(CustomerType.供货商))
                                <span class="help-block">请选择供货商</span>
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">
                            进货汇率:</label>
                        <div class="controls">
                            @Html.TextBoxFor(i => i.KoreaRate, new { @class = "span6", q = "q", money = "money" })
                            <span class="help-block">请输入进货韩国汇率<font color="red">[例：164.44]</font></span>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">
                            下单时间:</label>
                        <div class="controls">
                            @Html.TextBoxFor(i => i.OrderTime, new Dictionary<string, object>() { { "class", "datepicker span3" }, { "data-date-format", "yyyy-mm-dd" } })
                            <span class="help-block">请输入进货韩国汇率</span>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">
                            备注:</label>
                        <div class="controls">
                            @Html.TextAreaFor(i => i.Remark, new { @class = "span6", rows = "4" })
                            <span class="help-block">请输入订单备注 [最多输入2000个字符]</span>
                        </div>
                    </div>
                </div>
                <div class="form-actions">
                    @Html.HiddenFor(i => i.State)
                    @Html.HiddenFor(i => i.CreateTime)
                    <button id="Save" type="submit" class="btn btn-success" onclick="return checkfrom()"
                        style="width: 100px">
                        @Html.Raw(string.IsNullOrWhiteSpace(Request.QueryString["id"]) ? "添 加" : "修改")
                    </button>
                    <a href="@Url.Action("List", "BuyOrder")" class="btn btn-danger" style="width: 100px">
                        返 回</a>
                </div>
            </div>
            </form>
        </div>
    </div>
</div>
